home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
tpapi.exe
/
EXAMPLES
/
CAPQUEUE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-01-14
|
3KB
|
82 lines
{***************************************************************************}
{** Program : CAPQUEUE **}
{***************************************************************************}
{** Version : 1.0 ** Started : ** Ended : **}
{***************************************************************************}
{******************************** Description ******************************}
{***************************************************************************}
{** Program to show direct printing to a Netware print queue. **}
{** **}
{** **}
{** **}
{** **}
{** **}
{** **}
{** **}
{***************************************************************************}
{******************************** Information ******************************}
{***************************************************************************}
{** **}
{** **}
{** **}
{** **}
{** **}
{** **}
{***************************************************************************}
{$X+}
program CAPQUEUE;
uses
nwvar,
nwbindry,
nwqueue,
nwmisc,
objects
;
var
MNW : MiscFuncOBJ;
QS : QueueOBJ;
BS : BinderyOBJ;
JS : JobStruct286;
FileH : FileOfText;
Queues : PStringCollection;
NoOfQs : word;
QueueID: OT_binderyID;
begin
QS.Init (true);
BS.Init (true);
MNW.Init (true);
Queues := new (PStringCollection, Init (5, 10));
MNW.GetAllObjects ('*', OT_PrintQueue, Queues, NoOfQs);
BS.GetBinderyObjectID (PString (Queues^.At (0))^, OT_PrintQueue, QueueID);
with JS do
begin
fillchar (JS, sizeof (JS), 0);
TargetServerObjectID := -1;
fillchar (TargetExecutionTime, 6, 255);
JobType := 0;
JobControlFlags := $8;
end;
QS.CreateQueueJobAndFileText (QueueID, JS, FileH);
writeln (FileH, 'THIS IS A TEST PRINT OUT DIRECT TO A FILE IN A PRINT QUEUE.');
writeln (FileH, 'CHECK OUT CAPQUEUE.PAS');
QS.CloseFileAndStartQueueJobText (QueueID, JS.JobNumber, FileH);
QS.Done;
BS.Done;
MNW.Done;
end.